import javax.swing.tree.TreeNode;
import java.util.Stack;

public class Test {
    void inOrderNor(TreeNode root){
        Stack<TreeNode> s = new Stack<>();
        TreeNode cur = root;
        TreeNode top = root;
        while(cur != null|| !s.empty()){
            while (cur != null){
                s.push(cur);
                cur = cur.left;
            }
            top = s.pop();
            System.out.println(top);
            cur = cur.right;
        }
    }
}
